home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 32
/
Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso
/
Aminet
/
comm
/
tcp
/
hserv.lha
/
hserv
/
cgi-bin
/
counter.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-05-24
|
763b
|
48 lines
/* */
parse arg "df="file"&"dummy
call pragma("D",AddPart(GetClip("hserv_DocumentDir"),GetClip("hserv_CgiDir")))
path=GetClip("hserv_DocumentDir")
complete=AddPart(path,file)
n=0
if ~Open("IN",complete,'R') then
if ~Open("IN",complete,'W') then return ""
else call writech("IN",0)
else n=ReadLn("IN")
call close("IN")
if ~Datatype(n,'N') then n=0
else if n<0 then n=0
if ~Open("IN",complete,'W') then return ""
n=n+1
call WriteCH("IN",n)
call close("IN")
mkstrip
d.0="zero"
d.1="one"
d.2="two"
d.3="three"
d.4="four"
d.5="five"
d.6="six"
d.7="seven"
d.8="eight"
d.9="nine"
a=""
if n=0 then a="zero.gif"
else
do while n~=0
i=n//10
a="digits/"d.i || ".gif" a
n=n%10
end
say "Content-Type: text/html";say
cmd = "digits/mkstrip" a
shell COMMAND cmd